using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class BagItem : MonoBehaviour
{
    public Image icon;
    public Button btn;
    public Text num_text;
    public Text name_text;
    public BagData mydata;
    public void InitItem(BagData data)
    {
        mydata = data;
        icon.sprite = Resources.Load<Sprite>("UI/icon/" + data.data.icon);
        name_text.text = data.data.name;
        num_text.text = data.num.ToString();
    }
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
